<template>
<view class="communicList" style="height:100%">
<scroll-view class="scrollView" :refresherEnabled="false" 
:refresherThreshold="100"  :scroll-y="true"  @scroll="FunScroll">
    <!-- 订单信息简略 -->
    <view v-if="order_list && order_list.data && order_list.data.length > 0">
      <view
        class="communicList-box"
        v-for="(item, inx) of order_list.data"
        :key="inx"
        @click="toPages('/pages/libo/orderDetail/orderDetail?id='+item.id)"
      >
        <!-- 统计记录 -->
        <view class="record-list ">
          <view class="df-js">
            <!-- 订单类型 下单人 预算 -->
            <view class="">
              <text v-if="item.type_text2[0]" class="typeClass mar10" :class="typeClass[item.type_text2[0]]?typeClass[item.type_text2[0]]:'black'"> {{item.type_text2[0]}} </text>
              <text class=""> {{item.realname}} {{item.mobile}} </text>
            </view>
            <view class="cred2 ">预算：{{item.budget_text}}</view>
          </view>

        <view class='content ellipsis2'>{{item.info}}</view>

        <view class='content-image'>
          <image class='image' :src="image" v-for="(image,image_inx) of item.imgs" :key="image_inx" @error="defaultImg"/>
        </view>

          <!-- 地址 -->
          <view class="Difference df-js">
            <text class="">
              <view class="at-icon at-icon-map-pin"></view>
              {{ item.initAddr.province }}{{ item.initAddr.city
              }}{{ item.initAddr.area }}
            </text>
            <text class="">{{ $filters.fDate(item.create_time) }}</text>
            <text class=''>
            </text>
          </view>
        </view>
      </view>
    </view>

  <view v-else class="notData-box">
    <image class='notData-box-image' :src="kongPic"/>
    <text class='notData-box-text'>暂无订单</text>
  </view>

</scroll-view>
</view>

<view class='mat10'>&nbsp;</view>

</template>
<script>
import "./orderList.less";

import { toRefs } from "@vue/runtime-core";
 import baseMixin from '@/mixin/baseMixin';
import { showAlert } from '@/utils/comm';
import {kong} from "@/static/images/index.js";
export default {
  name: "communicList",
  props: ["order_list"],
  mixins:[baseMixin],
  setup(props, { attrs, slots, emit }) {



    //不同订单类型的样式
    const typeClass = {
      '防水':'black',
      '物流':'green',
    }

    //监听滚动条事件
    const FunScroll = (e)=>{
        console.log('scroll',e)
    }

    //showAlert('sss','2222')
    return {
      typeClass,
      ...toRefs(props),

      FunScroll,
    };
  },
  //子模板
  components: {
  },
};
</script>
